/* gcc -o ex1 ex1.c -L/usr/ccs/lib -lrt */

#include <unistd.h>
#include <time.h>
#include <stdio.h>

main()
{
	struct timespec ts;

      /* Call time */
	printf("time returns %d seconds\n", time(NULL));
       /* Call clock_gettime */

	clock_gettime(CLOCK_REALTIME, &ts);
	printf("clock_gettime returns:\n");
	printf("%d seconds and %ld nanoseconds\n", ts.tv_sec, ts.tv_nsec);
}
